package com.cycle.community.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cycle.community.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @author lenovo
 * @create 2022/8/11 19:41
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    User selectByName(String username);

    User selectByEmail(String email);

    //TODO 没有参数
    //返回更新行数
    @Update("update user set header_url = #{headUrl} where id=#{userId};")
    int updateHeader(long userId, String headUrl);
}
